//react应用入口页面
import React from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider,BrowserRouter as Router } from "react-router-dom";
import router from "./router/index";
import store,{persistor} from "./store";
import { Provider } from "react-redux";
<<<<<<< HEAD
<<<<<<< HEAD
import store from "./store/index";
=======
=======
import { PersistGate } from "redux-persist/integration/react";
import AuthRouter from "./components/AuthRouter";
import { AuthProvider } from "./components/AuthContext";
>>>>>>> abe34dd9e0c016ae179ddeb48aa20ee149d1fb38
 
 

>>>>>>> 6e8b3c82a561ae16179a9277d9e4c4a13b5b4a67
const root = ReactDOM.createRoot(
  document.getElementById("root") as HTMLElement
);
root.render(
  <React.StrictMode>
    <Provider store={store}>
      <PersistGate loading={null} persistor={persistor}>
        <AuthRouter>
          <RouterProvider router={router} />
        </AuthRouter>
      </PersistGate>
    </Provider>
  </React.StrictMode>

  // <React.StrictMode>
  //  <Provider store={store}>
  //    <PersistGate loading={null} persistor={persistor}>
  //    <AuthProvider>
  //        <AuthRouter>
  //          <RouterProvider router={router} />
  //         </AuthRouter>
  //      </AuthProvider>
  //    </PersistGate>
  //  </Provider>
  // </React.StrictMode>
);
console.log("NODE_ENV", process.env.NODE_ENV);
console.log("BASE_ENV", process.env.BASE_ENV);

